<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
    $connect = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
    $email = mysqli_real_escape_string ($connect, $_POST['email']);

    if (isset($email)) {
        if(strpos($email, '@') === false || strpos($email, '.') === false) {
            $email = $email;
        }
        else {
            return false;
        }
    }

    if (isset($name)) {
        if(strlen($name) > 3) {
            $name = $name;
        }
        else {
            return false;
        }
    }

    else {
        print('No form submitted');
    }

?>
